﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FormBase
{
    public partial class FPGM0090 : Form
    {
        string msHtml = string.Empty;
        string msHtmlHome;
        public FPGM0090()
        {
            InitializeComponent();
        }

        private void homeToolStripMenuItem_Click(object sender, EventArgs e)
        {
            msHtml = msHtmlHome;
            webBrowser1.DocumentText = msHtml;
        }

        private void FPGM0090_Load(object sender, EventArgs e)
        {
            msHtmlHome = "Hello Home";
            msHtml = msHtmlHome;
            webBrowser1.DocumentText = msHtml;
        }

        private void pageToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //webBrowser1.Url =  new Uri(@"\\myshare\help.html");
            webBrowser1.Url = new Uri(@"c:\Config\HomePage.htm");

        }

        private void Navigate(String address)
        {
            if (String.IsNullOrEmpty(address)) return;
            if (address.Equals("about:blank")) return;
            if (!address.StartsWith("http://") && !address.StartsWith("https://"))
            {
                address = "http://" + address;
            }
            try
            {
                webBrowser1.Navigate(new Uri(address));
            }
            catch (System.UriFormatException)
            {
                return;
            }
        }

    }
}
